#2 | Phalcon\Mvc\Application->handle(/resources/fotorama/';%20print((v.type%20==%20'youtube'%20?%20v.p%20+%20%27youtube.com/embed/%27%20+%20v.id%20+%27?autoplay=1%27%20:%20v.type%20==%20%27vimeo%27%20?%20v.p%20+%20%27player.vimeo.com/video/%27%20+%20v.id%20+%20%27?autoplay=1&badge=0%27%20:%20v.id)%20%20+%20(v.s%20&&%20v.type%20!=%20%27custom%27%20?%20%27&%27%20+%20v.s%20:%20%27%27))%20;__p%20+=%20%27)
/home/ebooking/sites/erobooking.com/public/index.php (152) <?php
error_reporting(1);
mb_internal_encoding('utf-8');
ini_set("display_errors", "1");
define("EMAIL_DOMAIN", "http://sualcavab.az/msend.php");
class Application extends \Phalcon\Mvc\Application
{
/**
* Register the services here to make them general or register in the ModuleDefinition to make them module-specific
*/
protected function _registerServices()
{
$di = new \Phalcon\DI\FactoryDefault();
$loader = new \Phalcon\Loader();
/**
* We're a registering a set of directories taken from the configuration file
*/
$loader->registerDirs(
array(
__DIR__ . '/../apps/library/'
)
)->register();
define('DEBUG', true);
if(DEBUG) {
error_reporting(1);
(new Phalcon\Debug)->listen();
}
// DB connection
$di->set('db', function () {
return new \Phalcon\Db\Adapter\Pdo\Mysql(array(
"host" => "localhost",
"username" => "ebooking",
"password" => "ebooking",
"dbname" => "ebooking",
"options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')
));
});
//Registering a router
$di->set('router', function(){
$router = new \Phalcon\Mvc\Router();
$router->setDefaultModule("frontend");
$router->setDefaultController("index");
$router->setDefaultAction("index");
$router->removeExtraSlashes(true);
$router->add('/:controller/:action/:int', array(
'controller' => 1,
'action' => 2,
'id' => 3,
));
$router->add('/:controller/:action', array(
'controller' => 1,
'action' => 2,
));
$router->add('/:controller', array(
'controller' => 1,
));
$router->add('/{language:[a-z]{2}}/:controller/:action/:int/:int', array(
'controller' => 2,
'action' => 3,
'lang' => 1,
'id' => 4,
'page' => 5,
));
$router->add("/{language:[a-z]{2}}/:params", array(
'controller' => 'index',
'action' => 'index',
'lang' => 1,
'keyword' => 2,
));
$router->add('/{language:[a-z]{2}}/:controller/:action/:int', array(
'controller' => 2,
'action' => 3,
'id' => 4,
'lang' => 1,
));
$router->add('/{language:[a-z]{2}}/:controller/:action', array(
'controller' => 2,
'action' => 3,
'lang' => 1,
));
$router->add("/{language:[a-z]{2}}/:controller", array(
'controller' => 2,
'lang' => 1,
));
$router->add("/{language:[a-z]{2}}/view/:int", array(
'controller' => 'products',
'action' => 'view',
'id' => 2,
'lang' => 1,
));
$router->add("/{language:[a-z]{2}}/view/:int/:params", array(
'controller' => 'products',
'action' => 'view',
'id' => 2,
'lang' => 1,
));
$router->add('/{language:[a-z]{2}}/news/:int/:params', array(
'controller' => "news",
'action' => "view",
'lang' => 1,
'id' => 2,
'slug' => 3,
));
$router->add("/{language:[a-z]{2}}", array(
'lang' => 1,
));
return $router;
});
$this->setDI($di);
}
public function main()
{
$this->_registerServices();
//Register the installed modules
$this->registerModules(array(
'frontend' => array(
'className' => 'Multiple\Frontend\Module',
'path' => '../apps/frontend/Module.php'
)
));
$request = new Phalcon\Http\Request();
echo $this->handle($request->getURI())->getContent();
}
}
$application = new Application();
$application->main();
|
#3 | Application->main()
/home/ebooking/sites/erobooking.com/public/index.php (158) <?php
error_reporting(1);
mb_internal_encoding('utf-8');
ini_set("display_errors", "1");
define("EMAIL_DOMAIN", "http://sualcavab.az/msend.php");
class Application extends \Phalcon\Mvc\Application
{
/**
* Register the services here to make them general or register in the ModuleDefinition to make them module-specific
*/
protected function _registerServices()
{
$di = new \Phalcon\DI\FactoryDefault();
$loader = new \Phalcon\Loader();
/**
* We're a registering a set of directories taken from the configuration file
*/
$loader->registerDirs(
array(
__DIR__ . '/../apps/library/'
)
)->register();
define('DEBUG', true);
if(DEBUG) {
error_reporting(1);
(new Phalcon\Debug)->listen();
}
// DB connection
$di->set('db', function () {
return new \Phalcon\Db\Adapter\Pdo\Mysql(array(
"host" => "localhost",
"username" => "ebooking",
"password" => "ebooking",
"dbname" => "ebooking",
"options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')
));
});
//Registering a router
$di->set('router', function(){
$router = new \Phalcon\Mvc\Router();
$router->setDefaultModule("frontend");
$router->setDefaultController("index");
$router->setDefaultAction("index");
$router->removeExtraSlashes(true);
$router->add('/:controller/:action/:int', array(
'controller' => 1,
'action' => 2,
'id' => 3,
));
$router->add('/:controller/:action', array(
'controller' => 1,
'action' => 2,
));
$router->add('/:controller', array(
'controller' => 1,
));
$router->add('/{language:[a-z]{2}}/:controller/:action/:int/:int', array(
'controller' => 2,
'action' => 3,
'lang' => 1,
'id' => 4,
'page' => 5,
));
$router->add("/{language:[a-z]{2}}/:params", array(
'controller' => 'index',
'action' => 'index',
'lang' => 1,
'keyword' => 2,
));
$router->add('/{language:[a-z]{2}}/:controller/:action/:int', array(
'controller' => 2,
'action' => 3,
'id' => 4,
'lang' => 1,
));
$router->add('/{language:[a-z]{2}}/:controller/:action', array(
'controller' => 2,
'action' => 3,
'lang' => 1,
));
$router->add("/{language:[a-z]{2}}/:controller", array(
'controller' => 2,
'lang' => 1,
));
$router->add("/{language:[a-z]{2}}/view/:int", array(
'controller' => 'products',
'action' => 'view',
'id' => 2,
'lang' => 1,
));
$router->add("/{language:[a-z]{2}}/view/:int/:params", array(
'controller' => 'products',
'action' => 'view',
'id' => 2,
'lang' => 1,
));
$router->add('/{language:[a-z]{2}}/news/:int/:params', array(
'controller' => "news",
'action' => "view",
'lang' => 1,
'id' => 2,
'slug' => 3,
));
$router->add("/{language:[a-z]{2}}", array(
'lang' => 1,
));
return $router;
});
$this->setDI($di);
}
public function main()
{
$this->_registerServices();
//Register the installed modules
$this->registerModules(array(
'frontend' => array(
'className' => 'Multiple\Frontend\Module',
'path' => '../apps/frontend/Module.php'
)
));
$request = new Phalcon\Http\Request();
echo $this->handle($request->getURI())->getContent();
}
}
$application = new Application();
$application->main();
|